<template>
    <div class="throttle-container">
       <button @click="clickButton" v-throttle>快速点击有效{{ index }}次</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            index: 0
        }
    },
    methods: {
        clickButton() {
            this.index ++
        },
    },
}
</script>

<style lang="less" scoped>
    .throttle-container {
        display: flex;
        justify-content: center;
        padding-top: 50px;
        button {
            width: 50%;
            text-align: center;
            height: 70px;
            line-height: 70px;
            border-radius: 15px;
            background-color: #426fe9;
            color: #fff;
        }
    }
</style>